<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<script>
			// 1.值传递
			// function test(name){
			// 	name = "kobe";
			// }
			
			// var temp = "why";
			// test(temp);
			// console.log(temp);
			
			// 2.引用传递
			function test(arr){
				arr[0] = "abc";
			}
			
			var temp = [10, 20, 30];
			test(temp);
			console.log(temp);
			
		</script>
	</body>
</html>
